<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ include file="/WEB-INF/pages/template/libs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

	<div class="framelight" style="width: 500px">
			<div class="title"><img src="resources/img/icon/buscar.png" align="absmiddle" />&nbsp;Ultimos estrenos</div>
		</div>
		
<div style="width: 800px;">

	<c:if test="${listPelicula!=null}">
		<div class="grid">
			<table cellspacing="0">
				<thead>
					<tr>
						<th width="20px">&nbsp;</th>
						<th>Pelicula</th>
						<th>Tipo</th>
						<th>Publico</th>
						<th>Pais</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="pelicula" items="${listPelicula}">
					<tr articuloId="<c:out value="${pelicula.id}" />" style="cursor: pointer;">
						<td><img src="resources/img/icon/<c:out value="${pelicula.emision}" />.png" /> </td>
						<td><c:out value="${pelicula.titulo}" /></td>
						<td>
						<c:if test="${ pelicula.tipoPelicula == '1' }">Comedia</c:if>
						<c:if test="${ pelicula.tipoPelicula == '2' }">Drama</c:if>
						<c:if test="${ pelicula.tipoPelicula == '3' }">Romantica</c:if>
						<c:if test="${ pelicula.tipoPelicula == '4' }">Accion</c:if>
						<c:if test="${ pelicula.tipoPelicula == '5' }">Terror</c:if>
						</td>
						<td>
						<c:if test="${ pelicula.publico == '1' }">Adulto</c:if>
						<c:if test="${ pelicula.publico == '2' }">Infantil</c:if>
						<td><c:out value="${pelicula.pais}" /></td>
					</tr>
					</c:forEach>
				</tbody>
				<tfoot>
					<tr>
						<td colspan="5">
							<ex:pager total="${pages}" current="${lastpage}" onPaging="javascript:onPaging(%p);" />
						</td>
					</tr>
				</tfoot>
			</table>
		</div>
	</c:if>
	<c:if test="${msg!=null}">
		<div class="grid" style="width: 800px;">
			<table cellspacing="0"  >
				<tbody>
					<tr>
						<td style="padding: 5px;"><i>
						
						<c:if test="${msg=='nofound'}">
							<bean:message key="app.word.nofound"/>
						</c:if>
						
						</i></td>
					</tr>
				</tbody>
			</table>
		</div>
	</c:if>

</div>


</body>
</html>